package 
{
	import com.greensock.TweenLite;
	import com.Trim;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import flash.geom.Point;
	import framework.FrameworkAdmin;
	import framework.ui.Tiptext;
	import framework.util.log.Logger;
	
	/**
	 * 参考《帝国战争》
	 * @Tag: 策略类     战争游戏
	 * @author Henrylee{henrylee_sz@qq.com}
	 */
	public class Main extends Sprite 
	{
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			
			this.tabChildren = false;
			this.tabEnabled = false;
			
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			
			FrameworkAdmin.init(stage, onFrameworkInitialize );
		}
		
		private function onFrameworkInitialize():void
		{
			Logger.log("FrameWorkAmin initialized");
			
			TweenLite.delayedCall(3, function():void {
					//new TextTip().showTip(new Point(400,200), "FrameWorkAmin initialized");
					new Tiptext("FrameWorkAmin initialized");
					new Tiptext("ssssssssssssss initialized");
					new Tiptext("eresdffdsfsdfs initialized");
				});
		}
		
	}
	
}

